package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@TableName("t_shopp")
public class ShoppBean {
    @TableId(value = "pk_shoppId", type = IdType.AUTO)
    private Integer id;
    @TableField(exist = false)
    private ProductBean product;
    @TableField("s_count")
    private Integer count;
    @TableField("fk_userId")
    private Integer userId;
    @TableField(exist = false)
    private Integer productId;

    public ShoppBean(Integer productId, Integer count, Integer userId) {
        this.productId = productId;
        this.count = count;
        this.userId = userId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public ShoppBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getUser() {
        return userId;
    }

    public void setUser(Integer userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "ShoppBean{" +
                "id=" + id +
                ", product=" + product +
                ", count=" + count +
                ", userId=" + userId +
                '}';
    }
}
